<?php
$mysqli = new mysqli("localhost", "root", "", "bbs");

//检查连接错误
if (mysqli_connect_errno()) {
    exit("连接失败: %s<br>". mysqli_connect_error());
}
$mysqli->query("set names utf8");

date_default_timezone_set('Asia/Shanghai');
